﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AMStudio.DelegateDispather;
using AMStudio.Script;
using AMStudio.Driver;
using Microsoft.Practices.EnterpriseLibrary.ExceptionHandling;
using Microsoft.Practices.EnterpriseLibrary.Common.Configuration;
using Microsoft.Practices.EnterpriseLibrary.Logging;


namespace AMStudio.Common
{
    public partial class GeneralManager
    {

        protected bool LaserConnectStatus(IAutomationDriver laser)
        {
            return (bool)laser.ExecuteReader("CONNECT_STATUS").Result;
        }
        private void HandleLaserEvents(string eventName, object e)
        {
            //StationEventArgs se = e as StationEventArgs;

            //if (se.From == "DialTablePLC")
            //{
            //    switch (se.Command)
            //    {
            //        case "CONNECT":
            //            DialTablePLCError = false;
            //            break;
            //        case "DISCONNECT":
            //            DialTablePLCError = true;
            //            break;
            //    }
            //}
            //else if (se.From == "OvenPLC")

            //{
            //    switch (se.Command)
            //    {
            //        case "CONNECT":
            //            OvenPLCError = false;
            //            break;
            //        case "DISCONNECT":
            //            OvenPLCError = true;
            //            break;
            //    }
            //}
        }
    }
}
